("数值竞赛,mathematica")

Clear["Global`*"];

Manipulate[
c = ColorData[3, "ColorList"];
a = List[{"天蝎", c[[1]], 3 + t}, {"白羊", c[[2]], E^(0.5*t)}, {"射手",
c[[3]], 5*t}, {"天秤", c[[4]], t^2}];
b = Sort[a, #1[[3]] < #2[[3]] &];
quantity = Table[b[[i]][[3]], {i, 1, Length[b]}];
color = Table[b[[i]][[2]], {i, 1, Length[b]}];
label = Table[b[[i]][[1]], {i, 1, Length[b]}];
BarChart[quantity, BarOrigin -> Left, ChartStyle -> color,
ChartLabels -> label, BarSpacing -> 0.2, LabelingFunction -> After,
ImageSize -> 500],
{t, 2, 15}, Button["时间复位", t = 2]]